import { $http } from './index';

export interface HomePageMediaCoverageReq {
    cityCodes: string[];
    businessScenario: number;
}

export interface HomePageMediaCoverageItem {
    mediaType?: number;
    premisesNum?: number;
    elevatorsNum?: number;
    pointNum?: number;
    coveredHouseholdNum?: number;
    coveredPeopleNum?: number;
    resourceOwner?: number;
    totalPointNum?:number;
    notSelectPointNum?:number;
}

export interface HomePageMediaCoverageRes {
    resourceSummary: HomePageMediaCoverageItem;
    mediaResourceSummaryList: HomePageMediaCoverageItem[];
}

// 获取首页电梯媒体分布
export function getHomePageMediaCoverage(params: HomePageMediaCoverageReq): Promise<HomePageMediaCoverageRes> {
    return $http.post('/mediaResource/homePageMediaCoverage', params);
}


import { Details } from '@/components/MSDItem/msd.module';

export interface MarketShareDetailReq {
    businessScenario: number;
    cityCodes: string[]
}


// 获取市场份额
export function getMarketShareDetail(params: MarketShareDetailReq): Promise<Details[]> {
    return $http.post('/mediaResource/resourceDistribution', params);
}
